<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>
        <ui:composition template="./../Template/TemplateAccount.xhtml">

            <ui:define name="content">
                <h:form>
                    <div id="noidung">
                        <div id="bang">
                            <div style="width: 100%">
                                <p:carousel itemStyleClass="carItem" pageLinks="4" autoPlayInterval="4000"   
                                            rows="1" effect="easeInStrong" circular="true" style="width: 817px;border: none"  headerText="SPAKE HELPDESK ">  
                                    <p:graphicImage value="./../Template/Image/slide/slide0.jpg"/>  
                                    <p:graphicImage value="./../Template/Image/slide/slide1.jpg"/>
                                    <p:graphicImage value="./../Template/Image/slide/slide2.jpg"/>
                                    <p:graphicImage value="./../Template/Image/slide/slide3.jpg"/>
                                    <p:graphicImage value="./../Template/Image/slide/slide4.jpg"/>
                                </p:carousel> 
                            </div>

                            <div style="width: 100%;margin-top: 5px;margin-left: 2px">                              
                                <p:fieldset id="tabView" legend="Technology">  
                                    <h:form id="form1">
                                        <p:dataTable var="new" value="#{newsBean.allByNewType1}" style="width: 100%;border: 1px solid #ccc">

                                            <p:column>
                                                <div style="height: 120px;background: whitesmoke;padding-top: 20px">
                                                    <div style="float: left;width: 100px;margin-right: 10px;margin-left: 10px">
                                                        <h:graphicImage url="./../Template/ImageNew/#{new.image}"/>
                                                    </div>
                                                    <div style="margin-left: 55px;margin-top: 20px">

                                                        <p:commandLink value="#{new.title}" action="#{newsBean.viewNew()}"
                                                                       style="font-size: 15px;font-weight: bolder;padding-left: 0px;padding-right: 5px;text-align: left;padding-top: 15px;height: 50px">
                                                            <f:setPropertyActionListener value="#{new}" target="#{newsBean.selectNews}" />
                                                        </p:commandLink>

                                                        <br/>
                                                        <p:rating stars="10" style="padding-top: 40px" value="#{newsBean.change(new.rate)}" readonly="true"/>
                                                    </div>
                                                </div>
                                            </p:column>
                                        </p:dataTable>
                                    </h:form>
                                </p:fieldset>

                                <div style="margin-top: 5px">
                                    <p:fieldset id="tabView2" legend="New Sofware">  
                                        <h:form id="form2">
                                            <p:dataTable var="new1" value="#{newsBean.allByNewType2}" style="width: 100%;border: 1px solid #ccc">
                                                <p:column>
                                                    <div style="height: 120px;background: whitesmoke;padding-top: 20px">
                                                        <div style="float: left;width: 100px;margin-right: 10px;margin-left: 10px">
                                                            <h:graphicImage url="./../Template/ImageNew/#{new1.image}"/>
                                                        </div>
                                                        <div style="margin-left: 55px;margin-top: 20px">

                                                            <p:commandLink value="#{new1.title}" action="#{newsBean.viewNew()}"
                                                                           style="font-size: 15px;
                                                                           font-weight: bolder;padding-left: 0px;padding-right: 5px;text-align: left;padding-top: 15px;height: 50px">
                                                                <f:setPropertyActionListener value="#{new1}" target="#{newsBean.selectNews}" />
                                                            </p:commandLink>

                                                            <br/>
                                                            <p:rating stars="10" style="padding-top: 40px" value="#{newsBean.change(new1.rate)}" readonly="true"/>
                                                        </div>
                                                    </div>
                                                </p:column>
                                            </p:dataTable>
                                        </h:form>
                                    </p:fieldset>
                                </div>

                                <div style="margin-top: 5px">
                                    <p:fieldset id="tabView3" legend="News">  
                                        <h:form id="form3">
                                            <p:dataTable var="new2" value="#{newsBean.allByNewType3}" style="width: 100%;border: 1px solid #ccc">
                                                <p:column>
                                                    <div style="height: 120px;background: whitesmoke;padding-top: 20px">
                                                        <div style="float: left;width: 100px;margin-right: 10px;margin-left: 10px">
                                                            <h:graphicImage url="./../Template/ImageNew/#{new2.image}"/>
                                                        </div>
                                                        <div style="margin-left: 55px;margin-top: 20px">

                                                            <p:commandLink value="#{new2.title}" action="#{newsBean.viewNew()}"
                                                                           style="font-size: 15px;font-weight: bolder;padding-left: 0px;padding-right: 5px;text-align: left;padding-top: 15px;height: 50px">
                                                                <f:setPropertyActionListener value="#{new2}" target="#{newsBean.se}" />
                                                            </p:commandLink>

                                                            <br/>
                                                            <p:rating stars="10" style="padding-top: 40px" value="#{newsBean.change(new2.rate)}" readonly="true"/>
                                                        </div>
                                                    </div>
                                                </p:column>
                                            </p:dataTable>
                                        </h:form>
                                    </p:fieldset>
                                </div>

                            </div>
                            <div style="width: 100%;margin-top: 5px;margin-left: 2px">
                                <p:growl id="growl" showDetail="true" />  
                                <p:fieldset id="tabViewFAQ" legend="FAQs">  
                                    <p:dataTable var="faqs" value="#{fAQsBean.all}" style="width: 100%;border: 1px solid #ccc;background: whitesmoke">
                                        <p:column>
                                            <div style="float: left;width: 50px;margin-top: 10px">

                                            </div>
                                            <div style="margin-left: 55px;margin-top: 10px">
                                                <h:link value="#{faqs.question}" style="font-size: 15px;font-weight: bolder;padding-left: 0px;padding-right: 5px;text-align: left"/>
                                                <br/>
                                                <h:outputText value="#{faqs.answer}" style="font-size: 12px;font-weight: normal;padding-left: 0px;padding-right: 5px;text-align: left"/>
                                            </div>
                                        </p:column>
                                    </p:dataTable>
                                </p:fieldset>
                            </div>
                        </div>
                    </div>
                </h:form>
            </ui:define>
        </ui:composition>
    </body>
</html>
